<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>组件--图列</title>
    <script src="../echarts.min.js"></script>
</head>
<body>
    <div id="main" style="width: 600px;height: 400px;"></div>
</body>
<script>
    let mychart = echarts.init(document.getElementById("main"))
    let option = {
        title:{
            text:"图列的使用",
            subtext:"已双柱状图为列",
            left:"center"
        },
        legend:{
            left:"right",
            data:["销量","进货量"]
        },
        tooltip:{
            trigger:"axis",
            axisPointer:{
                type:"shadow"
            }
        },
        xAxis:{
            data:["产品A","产品B","产品C","产品D","产品E"]
        },
        yAxis:{},
        series:[
            {name:"销量",type:"bar",data:[900,700,550,1000,200]},
            {name:'进货量',type:"bar",data:[1000,800,700,1300,400]}
        ]
    }
    mychart.setOption(option)
</script>
</html>